package com.fable.ntzw_ga.entity;

import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.annotations.Table;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.time.LocalDate;

@Data
@EqualsAndHashCode(callSuper = false)
@Entity
@Accessors(chain = true)
@JsonInclude(value = JsonInclude.Include.NON_NULL)
@Table(appliesTo = "feast_type",comment="酒席类型表")
public class FeastType {

    @Id
    @TableId(type = IdType.ASSIGN_UUID)
    @ApiModelProperty(value = "酒席id")
    @Column(name = "id", columnDefinition = "varchar(32) COMMENT '酒席id'")
    private String id;

    @ApiModelProperty(value = "举办地址")
    @Column(name = "address", columnDefinition = "text(255) COMMENT '举办地址'")
    private String address;

    @ApiModelProperty(value = "酒席状态")
    @Column(name = "feast_status", columnDefinition = "bit(1) COMMENT '酒席状态'")
    private Boolean feastStatus ;

    @ApiModelProperty(value = "酒席创建时间")
    @Column(name = "feast_time", columnDefinition = "datetime(0) COMMENT '酒席创建时间'")
    @DateTimeFormat("yyyy-MM-dd")
    private LocalDate feastTime ;

    @ApiModelProperty(value = "备注")
    @Column(name = "remarks", columnDefinition = "text(255) COMMENT '备注'")
    private String remarks;
}
